package org.hk.kg.finance.student.action;

import java.util.List;
import java.util.Map;

import org.hk.kg.finance.FinanceConstants;
import org.hk.kg.utils.Constants;
import org.hk.kg.utils.StringUtils;
import org.hk.kg.web.BaseAction;

public class StudentQryAction extends BaseStudentAction {
	public String getStudents()
	{
		Map qryMap = StringUtils.parseParams(getParams());
		List<Map> rlt = studentService.queryStudents(qryMap);
		StringBuffer buffer = new StringBuffer();
		for(Map m : rlt)
		{
			buffer.append("<tr>")
			.append("<td><input type=\"checkbox\" name=\"stuId\" value=\"" + m.get("stuId") + "\"/></td>")
			.append("<td>" + m.get("stuId") + "</td>")
			.append("<td>" + m.get("stuName") + "</td>")
			.append("<td>" + m.get("clzName") + "</td>")
			.append("<td>" + Constants.CONFIG.getValue(FinanceConstants.CLZ_TYPE_CONSTANTS, ""+m.get("stuType")) + "</td>")
			.append("</tr>");
		}
		return buffer.toString();
	}
}
